package javavm;

import org.apache.log4j.chainsaw.Main;

public class TestFinally {
    public static void main(String[] args) {
//        System.out.println(test() );
        System.out.println(test2() );
    }
    
    private static int test(){
        int x;
        try{
            x = 1;
            return x;
        }catch (Exception e) {
            x = 2;
            return x;
        }finally{
            x = 3;
        }
    }
    
    private static int test2(){
        int i=0;     
        try{     
            i=1;     
            return i;     
        }finally{     
            i=2;     
            return i;     
        }
    }
}
